package com.aquan.map_jetpack.ui.components.card


import androidx.compose.foundation.layout.*
import androidx.compose.material.Divider

import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp

import androidx.compose.ui.unit.sp
import com.aquan.map_jetpack.model.entity.card.CardItem

@Composable
fun TopNameBottomValCard(dataCard: CardItem = CardItem(name = "", value = "")) {
    Box(modifier = Modifier.padding(bottom = 5.dp)) {
        Column(
            modifier = Modifier.fillMaxWidth(),
            horizontalAlignment = Alignment.Start
        ) {
            Text(text = dataCard.name, fontSize = 8.sp, color = Color.Gray)
            Spacer(modifier = Modifier.height(5.dp))
            Text(text = dataCard.value, fontWeight = FontWeight.Bold, fontSize = 10.sp)
            Divider()
        }
    }
}


@Preview
@Composable
fun TopNameBottomValCardPreview() {
    TopNameBottomValCard()
}

